app.service("uploadService",function($http){
    this.uploadImage = function(){
       var formData = new FormData();
       formData.append("file",file.files[0]);// file.files[0] name=file 对应的input对应的所有文件
       return $http({
           method:'post',
           url:'/upload.do',
           data: formData,
           headers: {'Content-Type':undefined},
           transformRequest: angular.identity
       });
    }
});